<?php
/**
 * Copyright 2011  SURFfoundation
 * 
 * This file is part of ESCAPE.
 * 
 * ESCAPE is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * ESCAPE is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with ESCAPE.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information:
 * http://escapesurf.wordpress.com/
 * http://www.surffoundation.nl/
 * 
 * Contact: d.vierkant@utwente.nl
 * 
 * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3
 */
?>
<?php
	/* @var $repository escape_repository_Repository */
	$repository =& $this->requestAttributes['repository'];
	/* @var $repositoryUi escape_repositoryui_RepositoryUi */
	$repositoryUi =& $this->requestAttributes['repositoryUi'];

	/* @var $samlResponse SamlResponse */
	$samlResponse = $this->requestAttributes['samlResponse'];
	/* @var $userId string */
	$userId = $this->requestAttributes['userId'];
	/* @var $userProperties array */
	$userProperties = $this->requestAttributes['userProperties'];

	$templateVariables = array();
	$templateVariables['title'] = 'SAML debug';
	$this->requestAttributes['templateVariables'] =& $templateVariables;
?>
<?php $this->displayHeader(); ?>

<div class="escape_Section">

<span class="escape_SectionTitle">Matched user ID</span>
<?php
	escape_printr_pre($userId);
?>

<span class="escape_SectionTitle">Matched user properties</span>
<?php
	escape_printr_pre($userProperties);
?>

<span class="escape_SectionTitle">SAML name ID</span>
<?php
	escape_printr_pre($samlResponse->get_nameid());
?>

<span class="escape_SectionTitle">SAML attributes</span>
<?php
	escape_printr_pre($samlResponse->get_attributes());
?>

<span class="escape_SectionTitle">Raw SAML response</span>
<?php
	escape_printr_pre($samlResponse->xml->saveXML());
?>


</div>

<?php $this->displayFooter(); ?>
